<?php

/*
 * This is to delete files from folder.
 */
include '../../include/config.php';
if ($_GET['dir'] != 'pregnancy') {
    mysql_query("delete from baby_upload_files where Sr='" . $_GET['sur'] . "' and bid='" . $_GET['bid'] . "' ") or die(mysql_error());
}
if($_GET['dir']=='pregnancy'){
    mysql_query("delete from baby_mother_tests where sr = '".$_GET['sur']."' and bid='".$_GET['bid']."' ") or die(mysql_error());
    if($_GET['m']=='more'){
        mysql_query("delete from baby_upload_files where Sr='" . $_GET['sur'] . "' and bid='" . $_GET['bid'] . "' ") or die(mysql_error());
    }
}
header('Location:../folder/Folder?f=' . $_GET['dir']);
?>
